package com.eastedu.template.core.render;

import com.deepoove.poi.config.Configure;
import com.eastedu.template.model.ReportDataContainer;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

/**
 * The interface Report render.
 *
 * @author superman
 */
public interface ReportRender {
    /**
     * Render string.
     *
     * @param container the container
     * @param template  the template
     * @return 文件路径 string
     * @throws IOException the io exception
     */
    String render(ReportDataContainer container, InputStream template) throws IOException;

    /**
     * Render.
     *
     * @param container    the container
     * @param template     the template
     * @param outputStream the output stream
     * @throws IOException the io exception
     */
    void render(ReportDataContainer container, InputStream template, OutputStream outputStream) throws IOException;

    /**
     * Render string.
     *
     * @param container the container
     * @param template  the template
     * @param configure configure
     * @return 文件路径 string
     * @throws IOException the io exception
     */
    String render(ReportDataContainer container, InputStream template, Configure configure) throws IOException;

    /**
     * Render.
     *
     * @param container    the container
     * @param template     the template
     * @param outputStream the output stream
     * @param configure    configure
     * @throws IOException the io exception
     */
    void render(ReportDataContainer container, InputStream template, OutputStream outputStream, Configure configure) throws IOException;
}
